package com.train.${module}.facade;

import com.train.${module}.req.${Domain}AddOrEditReq;
import com.train.${module}.req.${Domain}PageReq;
import com.train.common.group.AddGroup;
import com.train.common.group.EditGroup;
import com.train.common.resp.CommonResp;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * ${domain} Facade 接口
 * @author ${author}
 * @createDate ${date}
 */
@RequestMapping("${domain_main}")
public interface ${Domain}Facade {

    @PostMapping("page")
    CommonResp pageList(@RequestBody @Validated ${Domain}PageReq req);

    @PostMapping("add")
    CommonResp add(@RequestBody @Validated(AddGroup.class) ${Domain}AddOrEditReq req);

    @PostMapping("edit")
    CommonResp edit(@RequestBody @Validated(EditGroup.class) ${Domain}AddOrEditReq req);

    @DeleteMapping("remove/{id}")
    CommonResp delete(@PathVariable("id") Long id);
}
